from django.urls import re_path
from rest_framework.routers import DefaultRouter

from . import views
from .views import QuestionViewSet

urlpatterns = [
    re_path(r'^labels/$',views.LabelsView.as_view()),
    re_path(r'^labels/(?P<id>\d+)/focusin/$', views.LabelCollect.as_view()),
    re_path(r'^labels/(?P<id>\d+)/focusout/$', views.LabelCollectnot.as_view()),
    re_path(r'^labels/(?P<id>\d+)/$', views.LabelsdetailView.as_view()),
    re_path(r'^labels/users/$', views.Labelusers.as_view()),
    re_path(r'^questions/$', views.AddquestionView.as_view()),
    re_path(r'^questions/(?P<id>\d+)/$', views.Questiondetail.as_view()),


]
router = DefaultRouter()
router.register(r'questions', QuestionViewSet,basename='')
urlpatterns += router.urls
router.register(r'reply', views.ReplyViewSet)
urlpatterns += router.urls
